import glob
import os

def get_api_file_names():
    """
    获取用例文件夹下所有的yaml文件名,带后缀
    返回list方便参数化
    :return: list
    """
    file_names = []
    yaml_files = glob.glob(os.path.join(r'.\test_case', "*.yaml"))
    for file in yaml_files:
        if 'api' in file:
            file_names.append(os.path.basename(file))
    return file_names

def get_file_quote():
    file_names = []
    yaml_files = glob.glob(os.path.join(r'.\test_case', "*.yaml"))
    for file in yaml_files:
        if 'quote' in file:
            file_names.append(os.path.basename(file))
    return file_names[0]
def get_file_extract():
    file_names = []
    yaml_files = glob.glob(os.path.join(r'.\test_case', "*.yaml"))
    for file in yaml_files:
        if 'extract' in file:
            file_names.append(os.path.basename(file))
    return file_names[0]